package de.java.shortys.myhome.fuelmonitor.model.dao;

import java.util.List;

import de.java.shortys.myhome.api.model.AbstractDao;
import de.java.shortys.myhome.fuelmonitor.model.IFuelFilling;
import de.java.shortys.myhome.fuelmonitor.model.IFuelMonitorStorageService;

public class FuelMonitorDao implements IFuelMonitorStorageService {

	private AbstractDao<IFuelFilling> fuelFillingDao; // per Spring

	@Override
	public void create(IFuelFilling fuelFilling) {
		fuelFillingDao.create(fuelFilling);
	}

	@Override
	public void delete(IFuelFilling fuelFilling) {
		fuelFillingDao.delete(fuelFilling);
	}

	public AbstractDao<IFuelFilling> getFuelFillingDao() {
		return fuelFillingDao;
	}

	@Override
	public List<IFuelFilling> read() {
		return fuelFillingDao.read();
	}

	public void setFuelFillingDao(AbstractDao<IFuelFilling> fuelFillingDao) {
		this.fuelFillingDao = fuelFillingDao;
	}

	@Override
	public void update(IFuelFilling fuelFilling) {
		fuelFillingDao.update(fuelFilling);
	}

}
